<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Conexao
 *
 * @author Antoniony
 */
class Conexao {

    private $bd;
    private $user;
    private $senha;

    function __construct($bd, $user, $senha) {
        $this->bd = $bd;
        $this->user = $user;
        $this->senha = $senha;
    }

    public function getBd() {
        return $this->bd;
    }

    public function setBd($bd) {
        $this->bd = $bd;
    }

    public function getUser() {
        return $this->user;
    }

    public function setUser($user) {
        $this->user = $user;
    }

    public function getSenha() {
        return $this->senha;
    }

    public function setSenha($senha) {
        $this->senha = $senha;
    }

    function Conectar() {
       $db = mysql_connect($this->getBd(), $this->user, $this->senha) or die(mysql_erro());
       mysql_select_db("shopcommerce web",$db);
    }

}

?>
